package Text_009;
import java.util.ArrayList;
import java.util.Scanner;
public class StudentCode {

	public static void main(String[] args) {
		Scanner sca = new Scanner(System.in);
		ArrayList<Student> List = new ArrayList<>();
		for(int i=0;i<3;i++) {
			Student stu = new Student();
			System.out.println("请输入名字：");
			String name = sca.next();
			System.out.println("请输入年龄：");
			int age = sca.nextInt();
			System.out.println("请输入id：");
			String id = sca.next();
			stu.setName(name);
			stu.setAge(age);
			stu.setId(id);
			List.add(stu);
		}
		for(int i=0;i<List.size();i++) {
			Student stu = List.get(i);
			System.out.println(stu.getName()+" "+stu.getAge());
		}

	}

}
